import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component

// register globally
Vue.component('svg-icon', SvgIcon)
// require.context(文件夹位置，是否递归读取，匹配后缀) ==> 返回函数
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext =>{
  return requireContext.keys().map(requireContext)
}
requireAll(req)
